<?php
/**
 * Organization profile summary
 *
 * Icon and profile fields
 *
 * @uses $vars['entity'], $vars['section']
 */

if (!isset($vars['entity']) || !$vars['entity']) {
	echo elgg_echo('organizations:notfound');
	return true;
}
$org = $vars['entity'];
$section = "";
switch($vars['section'])
{
	case 'tournaments':
		$section = elgg_view('frontend/profile/tournaments', $vars);
		break;
	case 'stats':
		$section = elgg_view('frontend/profile/stats', $vars);
		break;
	case 'contact':
		$section = elgg_view('frontend/profile/contact', $vars);
		break;
	//General
	default:
		$section = elgg_view('frontend/profile/general', $vars);
}

if(get_input('ajax'))
{
	echo $section;
	die;
}
?>


<!-- Right column or Content -->
<div class="elgg-body">
	<?php
		echo elgg_view('frontend/profile/tabs', $vars);
		
	?>
	<div id="section_content" style="margin-top:10px;">
		<?php echo $section; ?>
	</div>
</div>